﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _uitwerking__Algoritmiek
{
    public class code_LINSRCH
    {
        public code_LINSRCH()
        {

        }

        public int LinearSearch(List<int> numbers, int tofind)
        {
            for (int i = 0; i < numbers.Count; i++)
            {
                if (numbers[i] == tofind) return i;
            } return -1;
        }
    }
}
